package com.iv.durian.cloud.service;

import com.iv.durian.cloud.Banner;
import com.iv.durian.cloud.dao.BannerDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BannerService {

    @Autowired
    private BannerDao bannerDao;

    public int add(Banner banner) {
        return bannerDao.add(banner);
    }

    public int update(Banner banner) {
        return bannerDao.update(banner);
    }

    public int remove(Integer id) {
        return bannerDao.remove(id);
    }

    public int count(Integer type, Integer status) {
        return bannerDao.count(type,status);
    }

    public List<Banner> list(Integer type, Integer status) {
        return bannerDao.list(type,status);
    }

    public Banner get(Integer id) {
        return bannerDao.get(id);
    }
}
